12. Quaternion Exercise
Quaternions
Quaternions can be hard to get your head around, but you'll see they're worth it when you see how much simpler they are to work with than rotation matrices! To get your energy up for this next exercise, check out this awesome music video about William Rowan Hamilton, the inventor of the quaternion.
Quaternion Exercise
In this exercise, you'll write functions to convert from Euler angles to quaternions and back again. The math to do this is given below:
Quaternion to Euler
Euler to Quaternion
For additional tips on how you might implement this for your quadcopter in simulation (or in the real world) check out how it's implemented in the Udacidrone API you're using for the projects in this program!
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a